#include "test_json.hpp"

int main(int argc, char const *argv[])
{

    // 读取配置项的值
    ServerConfigSingleton *config = ServerConfigSingleton::getInstance();

    int header = config->getValue<int>(SERVER_JSON_HEADER);
    int type = config->getValue<int>(SERVER_JSON_TYPE);
    int length = config->getValue<int>(SERVER_JSON_LENGTH);
    std::string data = config->getValue<std::string>(SERVER_JSON_DATA);
    int tail = config->getValue<int>(SERVER_JSON_TAIL);

    // 打印读取的值

    std::cout << SERVER_JSON_HEADER << ":" << header << std::endl;
    std::cout << SERVER_JSON_TYPE << ":" << type << std::endl;
    std::cout << SERVER_JSON_LENGTH << ":" << length << std::endl;
    std::cout << SERVER_JSON_DATA << ":" << data << std::endl;
    std::cout << SERVER_JSON_TAIL << ":" << tail << std::endl;

    return 0;
}